package com.cheng.xbsc.mapper;

import com.cheng.xbsc.entity.Goods;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface GoodsMapper extends Mapper<Goods> {


    List<Goods> findNewGoods();

    Integer countByStatus();

    List<Goods> findHotGoods(Integer num);

    void updateLook(Integer goodsId);

    int countByUidAndGid(@Param("userId") Integer userId, @Param("goodsId") Integer goodsId);

    void deleteByUidAndGid(@Param("userId") Integer userId, @Param("goodsId") Integer goodsId);

    void saveByUidAndGid(@Param("userId") Integer userId, @Param("goodsId") Integer goodsId);

    List<Goods> findByTitle(String title);

    List<Goods> findCollect(Integer userId);
}